const ul = document.querySelector('ul');

async function getList() {
    const res = await fetch('/api/list');
    const data = await res.json();
    let str = '';
    data.forEach(link => {
        str += `<li><img src="${link}"></li>`
    });

    ul.innerHTML = str;
}

getList();